package com.yidu.boss.sys.controller;

import com.yidu.boss.sys.service.impl.ResourceServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author luoyushan
 * @Date 2019/11/22 10:16
 */

@Controller
@RequestMapping("/resource/")
public class ResourceController {

    @Resource
    ResourceServiceImpl resourceService;

    @RequestMapping("menu")
    @ResponseBody
    public List<com.yidu.boss.sys.domain.Resource> selectMenu(String parentId){
        List<com.yidu.boss.sys.domain.Resource> resources = resourceService.selectByParentId(parentId);
        return resources;
    }
}
